#ifndef GUI_WORKBENCH_H_H_H_H
#define GUI_WORKBENCH_H_H_H_H

#include <list>
#include <string>
#include "BaseClass.h"
#include "MenuManager.h"
#include "ToolBarManager.h"
#include "DockWindowManager.h"

class Workbench : public Base::BaseClass
{

	TYPESYSTEM_HEADER();
public:
	Workbench(void);
	virtual~Workbench(void);

	virtual void Initialize() = 0;

	std::string name() const;

	void setName(const std::string&);

	virtual void setupContextMenu(const char* recipient,MenuItem*)const{}

	virtual void createMainWindowPopupMenu(MenuItem*)const{}

 bool activate();

 void retranslate()const;

 virtual void activated(){}

 virtual void deactivated(){}

protected:

	virtual MenuItem* setupMenuBar()const = 0;

	virtual ToolBarItem* setupToolBars()const = 0;

	virtual ToolBarItem* setupCommandBars()const = 0;

	virtual DockWindowItems* setupDockWindow()const = 0;

private:
	void setupCustomToolbars(ToolBarItem* root,const char* toolbar)const;
	void setupCustomShortcuts()const;

private:
	std::string _name;

};

class StdWorkbench : public Workbench
{
	TYPESYSTEM_HEADER();
public:
	StdWorkbench();
	virtual ~StdWorkbench();

public:
	virtual void Initialize(){}
	virtual void setupContextMenu(const char* recipient,MenuItem*)const;
	virtual void createMainWindowPopupMenu(MenuItem*)const;
protected:
   virtual MenuItem* setupMenuBar()const;
   virtual ToolBarItem* setupToolBars()const;
   virtual ToolBarItem* setupCommandBars()const;
   virtual DockWindowItems* setupDockWindow()const;

};
class BlankWorkBench : public Workbench
{
	TYPESYSTEM_HEADER();

public:
	BlankWorkBench();
	virtual ~BlankWorkBench();

	virtual void Initialize(){}

	virtual void setupContextMenu(const char* recipient,MenuItem*)const;

	virtual void activated();

	virtual void deactivated();

protected:

	virtual MenuItem* setupMenuBar()const;

	virtual ToolBarItem* setupToolBars()const;

	virtual ToolBarItem* setupCommandBars()const;

	virtual DockWindowItems* setupDockWindow()const;


};

class NoneWorkbench : public StdWorkbench
{
	TYPESYSTEM_HEADER();
public:
	NoneWorkbench();
	virtual ~NoneWorkbench();

	virtual void Initialize(){}

	virtual void setupContextMenu(const char* recipient,MenuItem*)const;

protected:
	virtual MenuItem* setupMenuBar()const;
	virtual ToolBarItem* setupToolBars()const;
	virtual ToolBarItem* setupCommandBars()const;
	virtual DockWindowItems* setupDockWindow()const;


};

class CompleteWorkbench : public StdWorkbench
{
	TYPESYSTEM_HEADER();
public:
	CompleteWorkbench();
	virtual ~CompleteWorkbench();

	virtual void Initialize();
protected:

	virtual void setupContextMenu(const char* recipient,MenuItem*) const;

protected:
	/** Defines the standard menus. */
	virtual MenuItem* setupMenuBar() const;
	/** Defines the standard toolbars. */
	virtual ToolBarItem* setupToolBars() const;
	/** Defines the standard command bars. */
	virtual ToolBarItem* setupCommandBars() const;
	/** Returns a DockWindowItems structure of dock windows this workbench. */
	virtual DockWindowItems* setupDockWindow() const;

};

class TestWorkBench : public StdWorkbench
{
	TYPESYSTEM_HEADER();
public:

     TestWorkBench();
	 virtual ~TestWorkBench();

	 	virtual void Initialize(){}
public:
	virtual MenuItem* setupMenuBar()const;
	virtual ToolBarItem* setupToolBars()const;
	virtual ToolBarItem* setupCommandBars()const;
};

class StartWorkbench : public StdWorkbench
{
	TYPESYSTEM_HEADER();
public:
	StartWorkbench();
	~StartWorkbench();

	/** Defines the standard context menu. */
	virtual void setupContextMenu(const char* recipient,MenuItem*) const;
	/** Run some actions when the workbench gets activated. */
	virtual void activated();

protected:
	/** Defines the standard menus. */
	virtual MenuItem* setupMenuBar() const;
	/** Defines the standard toolbars. */
	virtual ToolBarItem* setupToolBars() const;
	/** Defines the standard command bars. */
	virtual ToolBarItem* setupCommandBars() const;
	/** Returns a DockWindowItems structure of dock windows this workbench. */
	virtual DockWindowItems* setupDockWindows() const;
};

/************************************************************************/
/*                                                                      */
/************************************************************************/

class  PartWorkbench : public StdWorkbench
{
	TYPESYSTEM_HEADER();

public:
	PartWorkbench();
	virtual ~PartWorkbench();

protected:
	MenuItem* setupMenuBar() const;
	ToolBarItem* setupToolBars() const;
	ToolBarItem* setupCommandBars() const;
};
#endif